package com.chaoxing.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "chaoxing")
public class ChaoXingConfig {
    private String username;
    private String password;
    
    private Sign sign = new Sign();
    private Location location = new Location();
    private Notification notification = new Notification();
    
    @Data
    public static class Sign {
        private boolean enabled = true;
        private long checkInterval = 300000; // 默认5分钟
    }
    
    @Data
    public static class Location {
        private boolean enabled = false;
        private double latitude;
        private double longitude;
        private String address;
    }
    
    @Data
    public static class Notification {
        private boolean enabled = true;
        private Email email = new Email();
        private ServerChan serverChan = new ServerChan();
    }
    
    @Data
    public static class Email {
        private String to;
    }
    
    @Data
    public static class ServerChan {
        private boolean enabled = false;
        private String key;
    }
}